package com.suke.czx.modules.tb.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.math.BigDecimal;


/**
 * 小程序用户表
 *
 * @author developer
 * @email developer@163.com
 * @date 2025-05-14 18:45:11
 */
@Data
@TableName("tb_user")
public class TbUser implements Serializable {
    public static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "用户ID (主键, 自增)")
    @JsonProperty(value = "id")
    public Long id;

    @ApiModelProperty(value = "小程序用户唯一标识")
    @JsonProperty(value = "openid")
    public String openid;

    @ApiModelProperty(value = "用户昵称")
    @JsonProperty(value = "nickname")
    public String nickname;

    @ApiModelProperty(value = "用户头像链接")
    @JsonProperty(value = "avatarUrl")
    public String avatarUrl;

    @ApiModelProperty(value = "手机号")
    @JsonProperty(value = "mobile")
    public String mobile;

    @ApiModelProperty(value = "密码")
    @JsonProperty(value = "password")
    @JsonIgnore
    public String password;

    @ApiModelProperty(value = "性别 (0-未知, 1-男, 2-女)")
    @JsonProperty(value = "gender")
    public Integer gender;

    @ApiModelProperty(value = "用户余额 (可选)")
    @JsonProperty(value = "balance")
    public BigDecimal balance;

    @ApiModelProperty(value = "用户状态 (1-正常, 0-禁用)")
    @JsonProperty(value = "status")
    public Integer status;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonProperty(value = "createDate")
    public Date createDate;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonProperty(value = "updateDate")
    public Date updateDate;


}
